package com.cn.lp;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * Description: 请描述你的文件
 *
 * @author wuqirong
 * @date 2023-06-20
 * <p>
 * All rights Reserved, Designed www.xiao100.com
 */
@RestController
public class TestController {

    @GetMapping("/test")
    public String test(String name, String age, HttpServletRequest request) {
        System.out.println("获取参数name:" + name);
        System.out.println("获取参数age:" +age);
        System.out.println("获取header的header_key_1:" + request.getHeader("header_key_1"));
        System.out.println("获取header的header_key_2:" + request.getHeader("header_key_2"));
        return "success";
    }

}
